package com.airport.ticket.entity;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


@Data
public class FlightInfo implements Serializable {
    private Integer id;

    private String flightNumber;

    private String flightCompany;

    private String flightModel;

    private String departurePlace;

    private String arrivalPlace;

    private String departureAirport;

    private String arrivalAirport;

    private String departureTime;

    private String arrivalTime;

    private BigDecimal price;

    private Date createTime;
    private Integer fromId;
    private Integer toId;

    /**
     * 直达还是中转
     */
    private String directTypeStr = "直达";
    /**
     * 换乘次数
     */
    private int directTypeNum;

    private static final long serialVersionUID = 1L;

    public FlightInfo(Integer id, String flightNumber, String flightCompany, String flightModel, String departurePlace, String arrivalPlace, String departureAirport, String arrivalAirport, String departureTime, String arrivalTime, BigDecimal price, Date createTime) {
        this.id = id;
        this.flightNumber = flightNumber;
        this.flightCompany = flightCompany;
        this.flightModel = flightModel;
        this.departurePlace = departurePlace;
        this.arrivalPlace = arrivalPlace;
        this.departureAirport = departureAirport;
        this.arrivalAirport = arrivalAirport;
        this.departureTime = departureTime;
        this.arrivalTime = arrivalTime;
        this.price = price;
        this.createTime = createTime;
    }

    public FlightInfo() {
        super();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFlightNumber() {
        return flightNumber;
    }

    public void setFlightNumber(String flightNumber) {
        this.flightNumber = flightNumber == null ? null : flightNumber.trim();
    }

    public String getFlightCompany() {
        return flightCompany;
    }

    public void setFlightCompany(String flightCompany) {
        this.flightCompany = flightCompany == null ? null : flightCompany.trim();
    }

    public String getFlightModel() {
        return flightModel;
    }

    public void setFlightModel(String flightModel) {
        this.flightModel = flightModel == null ? null : flightModel.trim();
    }

    public String getDeparturePlace() {
        return departurePlace;
    }

    public void setDeparturePlace(String departurePlace) {
        this.departurePlace = departurePlace == null ? null : departurePlace.trim();
    }

    public String getArrivalPlace() {
        return arrivalPlace;
    }

    public void setArrivalPlace(String arrivalPlace) {
        this.arrivalPlace = arrivalPlace == null ? null : arrivalPlace.trim();
    }

    public String getDepartureAirport() {
        return departureAirport;
    }

    public void setDepartureAirport(String departureAirport) {
        this.departureAirport = departureAirport == null ? null : departureAirport.trim();
    }

    public String getArrivalAirport() {
        return arrivalAirport;
    }

    public void setArrivalAirport(String arrivalAirport) {
        this.arrivalAirport = arrivalAirport == null ? null : arrivalAirport.trim();
    }

    public String getDepartureTime() {
        return departureTime;
    }

    public void setDepartureTime(String departureTime) {
        this.departureTime = departureTime;
    }

    public String getArrivalTime() {
        return arrivalTime;
    }

    public void setArrivalTime(String arrivalTime) {
        this.arrivalTime = arrivalTime;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", flightNumber=").append(flightNumber);
        sb.append(", flightCompany=").append(flightCompany);
        sb.append(", flightModel=").append(flightModel);
        sb.append(", departurePlace=").append(departurePlace);
        sb.append(", arrivalPlace=").append(arrivalPlace);
        sb.append(", departureAirport=").append(departureAirport);
        sb.append(", arrivalAirport=").append(arrivalAirport);
        sb.append(", departureTime=").append(departureTime);
        sb.append(", arrivalTime=").append(arrivalTime);
        sb.append(", price=").append(price);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}